package org.jeecg.modules.demo.traderquota.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.traderquota.entity.PostorderPrice;
import org.jeecg.modules.demo.traderquota.entity.TraderQ;
import org.jeecg.modules.demo.traderquota.mapper.TraderQMapper;
import org.jeecg.modules.demo.traderquota.service.ITraderQService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@DS("multi-datasource1")
@Service
public class TraderQServiceImpl extends ServiceImpl<TraderQMapper, TraderQ> implements ITraderQService {

    @Autowired
    private TraderQMapper traderQMapper;

    public List<PostorderPrice> countTotal(Integer potraderid){
        return traderQMapper.countTotal(potraderid);
    }

    public void updateTraderQById(Integer id, Double quota){
        traderQMapper.updateTraderQById(id, quota);

    }
}
